<?php
include('top.php');
if(empty($_SESSION['taal'])) {
	session_destroy();
		Header( "HTTP/1.1 301 Moved Permanently" );
		 
		Header( "Location: login.php" ); 
}
foreach($_POST as $sleutel => $waarde) {
		echo "sleutel = $sleutel en waarde = |$waarde| <br>";}
 
if($_SESSION['login'] > "0") { 
	session_destroy();
	Header( "HTTP/1.1 301 Moved Permanently" );
	Header( "Location: login.php" );  }
echo "<br /><h2><div style='text-align: center'> $updb[$taal] Delsaux</div></h2>";
require_once('pasmy/dbwaarden.php');
 
echo "<br><br>";
$mysql_id = mysql_connect($dbhost, $dbuser, $dbpass);
mysql_select_db($db, $mysql_id);

if(isset($_POST["update"])){
	
	$maal = $_POST["eigproc"]/100; $procenten=$_POST["eigproc"];
		
$sql="Select pal1,pal2,pal3,pal4,pal5,pal6 FROM delsaux2";
$res = mysql_query($sql, $mysql_id);
	while ($row = mysql_fetch_row($res)) {
		$row1 = number_format($row[0] + ($row[0]*$maal),2);
		$row2 = number_format($row[1] + ($row[1]*$maal),2);
		$row3 = number_format($row[2] + ($row[2]*$maal),2);
		$row4 = number_format($row[3] + ($row[3]*$maal),2);
		$row5 = number_format($row[4] + ($row[4]*$maal),2);
		$row6 = number_format($row[5] + ($row[5]*$maal),2);
		$sql2 = "UPDATE delsaux2 SET pal1=$row1,pal2=$row2,pal3=$row3,pal4=$row4,pal5=$row5,pal6=$row6 WHERE pal1='$row[0]'
		 AND pal2='$row[1]'
		 AND pal3='$row[2]'
		 AND pal4='$row[3]'
		 AND pal5='$row[4]'
		 AND pal6='$row[5]'
		";
		
		$res2 = mysql_query($sql2, $mysql_id);
	
		
	}
 
$nieuweprijs = (100 * $maal)+ 100;
 
?>

<br /><br /><br />
<strong><div style="text-align: center"><?php echo "$werdenverhoogd[$taal]" . "&nbsp;" . "$procenten";?>%</div></strong>
<br /><br /><br />



<?php
}
include('footer.php');
?>